<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateNwYbzZyjTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
      Schema::create('nw_ybz_zyj', function (Blueprint $table) {
        $table->id(); // 这是Laravel用于自增主键的快捷方式
        $table->string('resource_set_name')->comment('资源集名称');
        $table->string('alias')->nullable()->comment('资源集别名');
        $table->unsignedBigInteger('tenant_id')->comment('所属租户')->index(); // 假设租户ID为bigint类型，需要外键的话可以稍后添加
        $table->string('authorized_vdc')->comment('授权VDC');
        $table->string('principal')->nullable()->comment('责任人');
        $table->string('status')->comment('状态');
        $table->string('region')->nullable()->comment('所属区域');
        $table->boolean('supports_shared_vpc')->default(false)->comment('是否支持共享VPC');
        $table->text('description')->nullable()->comment('描述');
        $table->timestamps(); // 创建时间和更新时间
    });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('nw_ybz_zyj');
    }
}
